import request from '@/utils/request'
import { requestPath } from '@/utils/global.js'

export function getNumAPI(params) { //获取数量
    return request({
        url: `${requestPath.resource1}/resource/Type/count`,
        method: 'get',
        params
    })
}

export function getListAPI(params) { //获取列表
    return request({
        url: `${requestPath.sysuser1}/forum/page`,
        method: 'get',
        params
    })
}

export function postDetAPI(params) { //帖子详情
    return request({
        url: `${requestPath.sysuser1}/forum/get`,
        method: 'get',
        params
    })
}

export function sendPostAPI(data) { //发帖
    return request({
        url: `${requestPath.sysuser1}/forum/save`,
        method: 'post',
        data
    })
}

export function agreePostAPI(data) { //点赞
    return request({
        url: `${requestPath.sysuser1}/forum/agree`,
        method: 'post',
        data
    })
}

export function deletePostAPI(data) { //删除
    return request({
        url: `${requestPath.sysuser1}/forum/delete/${data}`,
        method: 'post',
    })
}

export function agreeAPI(data) { //点赞
    return request({
        url: `${requestPath.sysuser1}/forum/agree`,
        method: 'post',
        data
    })
}

export function reviewAPI(params) { //评论列表
    return request({
        url: `${requestPath.sysuser1}/forum/get/reply/list`,
        method: 'get',
        params
    })
}